package ua.kharkiv.knure.karimov.Task1;

import java.util.Random;

import ua.kharkiv.knure.karimov.Task1.VeryLongInt;

public class Task1 {	
	
	public final static int X = 123417;

	public static void main(String[] args) throws Exception {
		//*
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.1");
		 System.out.println("Greatest common divisor 55 by 130: " + work.GCD(55, 130));
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.2");
		 int X = new Random(System.currentTimeMillis()).nextInt(10000);
		 System.out.println("Calculate sum of digits " + X + ": " + work.SoD(X));
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.3");
		 System.out.println(X + " is" + (work.isSimple(X)?"":" not")+ " a simple number");
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.4");
		 VeryLongInt n = new VeryLongInt("51");
		 System.out.println("Calc sum of factorials sequence to " + n + ": " + work.facSum(n));
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.5");
		 System.out.println("Equal sum the first three and the last two digits are: " + work.task15());
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.6");
		 int[] arr = work.task16();
		 for (int i=0; i<arr.length; i++)
		 	System.out.println(arr[i]);
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.7");
		 arr = work.task17();
		 for (int i=0; i<arr.length; i++)
		 	System.out.println(arr[i]);
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.8");
		 work.task18(5,5);
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.9");
		 System.out.println("For fill: " + work.task19());
		 System.out.println();
		 System.out.println("=========================");
		 System.out.println("\u0009TASK 1.10");
		 String[] strings = work.task110();
		 for (int i=0; i<strings.length; i++)
			 System.out.println(strings[i]);
		 //*/
	}
}

